package com.lucy.disk.loader;

import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

/**
 * @author kindear
 * office 服务加载
 */
public interface OfficeServiceLoader {
    /**
     * 获取预览页面
     * @param documentKey
     * @return ModelAndView
     */
    ModelAndView loadPreviewView(String documentKey, HttpServletResponse response) throws IOException;

    /**
     * 获取编辑页
     * @param documentKey
     * @param response
     * @return
     * @throws IOException
     */
    ModelAndView loadEditorView(String documentKey, HttpServletResponse response) throws IOException;

    /**
     * 编辑回调
     * @param map Map 形式参数
     * @return 请求响应
     */
    Object editorCallBack(Map<String,Object> map);

}
